package com.etooling.germa.thread;

import com.etooling.framework.entity.ImportDataBatch;
import com.etooling.germa.service.ImportBomService;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

public class UploadBomExcelThread extends Thread {

    private ImportBomService importBomService;
    private ImportDataBatch importDataBatch;
    private String loginId;
    private String companyId;
    private String bomName;
    private String bomMemo;
    private String specsId;
    private byte[] fileContent;

    public UploadBomExcelThread(ImportBomService importBomService,
                                ImportDataBatch importDataBatch,
                                String loginId,
                                String companyId,
                                String bomName,
                                String bomMemo,
                                String specsId) {
        this.importBomService = importBomService;
        this.importDataBatch = importDataBatch;
        this.loginId = loginId;
        this.companyId = companyId;
        this.bomName = bomName;
        this.bomMemo = bomMemo;
        this.specsId=specsId;
//        this.fileContent = fileContent;
    }

    @Override
    public void run() {
        this.importBomService.processUpload(this.importDataBatch, this.loginId, this.companyId, this.bomName, this.bomMemo,this.specsId);

    }
}
